from telnetlib import DO

import numpy as np
from manim import *
from numpy import flip, insert
import math

LV, QL, QH, JH = '#75cfb8', '#bbdfc8', '#f0e5d8', '#ffc478'

class p1(ThreeDScene):
    def construct(self):
        # self.camera.frame.save_state()
        # self.add(NumberPlane())
        # self.camera.frame.rotate(13*DEGREES,about_point=[0.0, 0.0, 1.0])
        np=NumberPlane([0,5.01],[0,5.01]).move_to(ORIGIN).set_color(BLACK)
        a,b=[-2.5,-2.5,0],[2.5,2.5,0]
        self.add(np,
                 Dot(a).set_color(LV),
                 Dot(b).set_color(JH),
                 MathTex('A').next_to(a,DL),
                 MathTex('B').next_to(b,UR)
                 )

class p2(ThreeDScene):
    def construct(self):
        # self.camera.frame.save_state()
        # self.add(NumberPlane())
        # self.camera.frame.rotate(13*DEGREES,about_point=[0.0, 0.0, 1.0])
        np=NumberPlane([0,15.01],[0,15.01],5,5).move_to(ORIGIN).set_color(BLACK)
        a,b=[-2.5,-2.5,0],[2.5,2.5,0]
        self.add(np,
                 Dot(a).set_color(LV),
                 Dot(b).set_color(JH),
                 MathTex('A').next_to(a,DL),
                 MathTex('B').next_to(b,UR)
                 )
        # p2
        s=Square().stretch(5,1).set_color(WHITE).set_fill(WHITE,1).rotate_about_origin(PI/4)
        self.add(s,
                 MathTex(r'\cdots')
                 )